import { NextRequest } from 'next/server';

export const runtime = 'edge';

export async function GET(request: NextRequest) {
  const url = new URL(request.url);
  url.host = 'localhost:8000';
  url.protocol = 'http:';
  url.pathname = '/sse';

  return fetch(url, {
    method: 'GET',
    headers: request.headers
  });
}